package com.chinasofti.mydate;

import java.util.Date;

public class  DateDemo02 {
    public static void main(String[] args) {
        //method1()://ctrl+alt+m  //代码重构快捷键
        method2();
    }

    private static void method2() {
        Date date1=new Date();
        date1.setTime(0L);
        System.out.println("date1 = " + date1);
    }

    private static void method1(){
        Date date1=new Date();
        long time=  date1.getTime();//获取当前时间的毫秒值
        System.out.println("time"+time);

        long time2=  System.currentTimeMillis();
        System.out.println("time2 = " + time2);

    }
}